#define _CRT_SECURE_NO_WARNINGS 1
#include "1.h"

bool test(ListNode* head)
{
    struct ListNode* mid = MiddleNode(head);
    struct ListNode* head1 = ReverseList(mid);
    while (head1 != NULL) {
        if (head->val != head1->val)
            return false;
        else {
            head = head->next;
            head1 = head1->next;
        }
    }
    return true;
}

int main()
{
    ListNode* head;
    Initiate(&head);
    int arr[] = { 1,2,2,1 };
    for (int i = 0; i < 4; i++)
    {
        PushNode(&head, arr[i]);
    }
    bool s = test(head);
    if (s)
    {
        printf("true\n");
    }
}
